package reflection;

import java.lang.annotation.ElementType;

/**
 * @author 小小唐
 * @Date 2022/8/28-星期日-11:05
 * 所有类型的class
 */
public class Demo3 {
    public static void main(String[] args) {
        Class<Object> c1 = Object.class;//类
        Class cc1 = Object.class;//类
        Class<Comparable> c2 = Comparable.class;//接口
        Class cc2 = Comparable.class;//接口
        Class<String[]> c3 = String[].class;//一维数组
        Class cc3 = String[].class;//一维数组
        Class<String[][]> c4 = String[][].class;//二维数组
        Class cc4 = String[][].class;//二维数组
        Class<Override> c5 = Override.class;//注解
        Class cc5 = Override.class;//注解
        Class<ElementType> c6 = ElementType.class;//枚举
        Class cc6 = ElementType.class;//枚举
        Class<Integer> c7 = Integer.class;//基本数据类型
        Class cc7 = Integer.class;//基本数据类型
        Class<Void> c8 = void.class;//void
        Class cc8 = void.class;//void
        Class<Class> c9 = Class.class;//Class
        Class cc9 = Class.class;//Class

        System.out.println(c1);
        System.out.println(cc1);
        System.out.println(c2);
        System.out.println(cc2);
        System.out.println(c3);
        System.out.println(cc3);
        System.out.println(c4);
        System.out.println(cc4);
        System.out.println(c5);
        System.out.println(cc5);
        System.out.println(c6);
        System.out.println(cc6);
        System.out.println(c7);
        System.out.println(cc7);
        System.out.println(c8);
        System.out.println(cc8);
        System.out.println(c9);
        System.out.println(cc9);

        System.out.println(c1.equals(cc1));
        System.out.println(c1.hashCode());
        System.out.println(cc1.hashCode());

    }
}
